package com.example.studentmanager.Dao;

import com.example.studentmanager.Pojo.Student;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

public class StudentDao extends BaseDao{
    private   String sql;
    private Student stu;
    private List<Student> list;
    public  ResultSet queryallStudent() throws SQLException {
        sql="select * from student";
        ResultSet rs= this.SelectAll(sql);
        return rs;

    }

    public  String QueryByKey(){
        sql="select * from student where studentid=(?)";
       return  sql;
    }
    public String Updatestu(){
        //静态的sql
         sql="update student set name=?,cls=?,grade=?,phone=?,home=?,state=? where studentid=?";
return sql;

    }
    public  String InsertIntoStudent(){
        sql="insert into student values(null,?,?,?,?,?,?,?)";
        return sql;
    }

}
